From 33f53e1d0460b26f5dd4713555cc553dbef4847a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Javier=20Jard=C3=B3n?= Date: Tue, 20 Oct 2009 20:43:44 +0200 Subject: [PATCH] Fix a compilation warning Catch the returned value of write() --- modules/other/gail/tests/ferret.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/other/gail/tests/ferret.c b/modules/other/gail/tests/ferret.c index 14281deb21..531651bddb 100644 --- a/modules/other/gail/tests/ferret.c +++ b/modules/other/gail/tests/ferret.c @@ -429,11 +429,14 @@ static void _send_to_festival (const gchar *role_name, static void _festival_write (const gchar *command_string, int fd) { + gssize n_bytes; + if (fd < 0) { perror("socket"); return; } - write(fd, command_string, strlen(command_string)); + n_bytes = write(fd, command_string, strlen(command_string)); + g_assert (n_bytes == strlen(command_string)); } static void _speak_caret_event (AtkObject *aobject) -- 2.30.2